package com.itic.mall.system.orders.detail.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.itic.appbase.framework.type.PayType;
import com.itic.mall.system.orders.detail.persistence.model.OrdersDetail;
import com.itic.mall.system.users.usersmall.persistence.model.UsersMall;




public interface OrdersDetailService{
    
    public String addOrderDetail(Double deducScore, Integer score,double sumAmount,String isUsePoints,String userNickName,String orderNo,Double expressFee,double actualPay,String yunId,String userId,String addressId ,String couponId,String buyMsg) ;
    
    public OrdersDetail getOrdersDetailByOrderNo(String orderNo) ;
    
    // 封装各种支付成功后的业务
    public String aliPaySuccess(String orderNo, String payNo, PayType payType, Date payTime) ;
    
    public String addUsersScore(UsersMall usersMall,double consume,String orderNo) ;
    /**
     * 获取用户最近的下单
     * @param userId
     * @param date
     * @return
     */
    public List<OrdersDetail> findUserLateDateOrdersDetail(String userId,Date date);
    
    public List<OrdersDetail> findUserLateDateNotExistOrdersDetail(String userId,Date date);
    /**
     * 获取用户的所有订单记录
     * @param userId
     * @return
     */
    public List<OrdersDetail> findUserLateDateOrdersDetail(String userId);
    /**
	 * 获取用户总的消费金额和消费笔数
	 * @param userId
	 * @return
	 */
	public Map<String, Object>  getUserTotalCousume(String userId) ;
	/**
	 * 
	 * @param userId
	 * @return
	 */
	public List<String> getOrderNos(String yunUserId);
}